<?php
    use admin\assets\AppAsset;
    AppAsset::addJs($this,'/static/js/admin/set_menu.js');
?>

<style>
    body{overflow-y: scroll;}
    .layui-form-select dl dd, .layui-form-select dl dt {
        padding: 0 10px;
        line-height: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>

<div class="container">
    <blockquote class="layui-elem-quote">
        菜单列表 - 添加菜单
    </blockquote>

    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">父级菜单</label>
            <div class="layui-input-block">
                <select name="parent_id">
                    <option value="0">--请选择父级菜单--</option>
                    <?php foreach($menu_list as $key=>$val): ?>
                        <option value="<?php echo $key; ?>"><?php echo $val; ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">*菜单名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" placeholder="请输入菜单名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">绝对地址</label>
            <div class="layui-input-block">
                <input type="radio" name="is_absolute_url" value="1" title="是">
                <input type="radio" name="is_absolute_url" value="0" title="否" checked="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" name="url" readonly value="<?php echo $name; ?>" placeholder="例：site/index" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">图标 <i id="show_icon" class="fa fa-file-image-o"></i> <a style="color:darkblue" target="_blank" href="http://www.fontawesome.com.cn/faicons/">url</a></label>
            <div class="layui-input-block">
                <input type="text" id="icon" name="icon" placeholder="例：fa-camera-retro 取 fa- 后的部分" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" name="sort" value="0" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否显示</label>
            <div class="layui-input-block">
                <input type="radio" name="is_display" value="1" title="是" checked="">
                <input type="radio" name="is_display" value="2" title="否">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="menu_submit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

</div>


